package com.powernode.business.controller;

import com.powernode.business.service.CustomerService;
import com.powernode.business.vo.AreaVo;
import com.powernode.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("business/statistics")
@Api(tags = "客户地区管理饼图")
public class StatisticsController {

    @Autowired
    private CustomerService customerService;

    @GetMapping("getCustomerArea")
    @ApiOperation("请求地区人数解析饼图")
    public AjaxResult getCustomerArea(){
        List<AreaVo> areas = customerService.selectArea();
        return AjaxResult.success(areas);
    }
}
